
import { IsNotEmpty } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class CreateBannerDto {

    @IsNotEmpty()
    @ApiProperty({description:'标题'})
    title: string;

    @IsNotEmpty()
    @ApiProperty({description:'图片路径'})
    img: string;

    @IsNotEmpty()
    @ApiProperty({description:'开始时间'})
    startAt: string;

    @IsNotEmpty()
    @ApiProperty({description:'结束时间'})
    endAt: string;

    @ApiProperty({description:'简介',required:false})
    intro:string;

    @ApiProperty({description:'外链地址',required:false})
    linkUrl:string;

    @ApiProperty({description:'内链地址',required:false})
    path:string;
} 